<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

/**
 * 会员组
 */
class Group extends Model
{
    use HasFactory;

    protected $fillable = ['title', 'days', 'site_num'];

    /**
     * 组包含的所有套餐
     * @return void
     */
    public function packages()
    {
        return $this->belongsToMany(Package::class, 'group_package');
    }
}
